/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gn.eugene.equals;

/**
 *
 * @author Eugene
 */
class Student extends People
{

    private int year;

    public Student(String newName, int newAge, int newHeight, int newYear)
    {
        super(newName,newAge,newHeight);
        this.year = newYear;
    }
    
    public void setYear(int newYear)
    {
        year = newYear;
    }
    
    public int getYear()
    {
        return year;
    }
    
    @Override
    public boolean equals(Object obj)
    {
        
        if(this.equals(obj))
        {
            Student temp = (Student)obj;
            if(this.getYear() == temp.getYear())
            {
                return true;
            }
        }
        
        return false;
    }
    
}
